package com.btks.mapreduce.outputformat;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

import java.io.IOException;

/**
 * @author yiwannuofulasi
 * @description 自定义OutputFormat
 * @date 2023/3/27 11:25
 * Copyright (c) 2023/3/27 by yiwannuofulasi yiwannuofulasi@163.com, by 新疆兵团勘测设计院（集团）有限公司 All Rights Reserved.
 */
public class LogOutPutFormat extends FileOutputFormat<Text, NullWritable> {


    @Override
    public RecordWriter<Text, NullWritable> getRecordWriter(TaskAttemptContext taskAttemptContext) throws IOException, InterruptedException {
        return new LogRecordWriter(taskAttemptContext);
    }
}
